<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="companyList.title"/></title>
    <meta name="heading" content="<fmt:message key='companyList.heading'/>"/>
    <meta name="menu" content="CompanyMenu"/>
</head>

<div id="search">
<form method="get" action="${ctx}/companies" id="searchForm">
    <input type="text" size="20" name="q" id="query" value="${param.q}"
           placeholder="Enter search terms"/>
    <input type="submit" value="<fmt:message key="button.search"/>"/>
</form>
</div>

<input type="button" style="margin-right: 5px" onclick="location.href='<c:url value="/companyform"/>'" value="<fmt:message key="button.add"/>"/>
<input type="button" onclick="location.href='<c:url value="/mainMenu"/>'" value="<fmt:message key="button.done"/>"/>

<display:table name="companyList" class="table" partialList="true" requestURI="" id="companyList" export="true" size="${companyList.fullListSize}" pagesize="${companyList.objectsPerPage}">
    <display:column property="id" sortable="true" href="companyform" media="html"
        paramId="id" paramProperty="id" titleKey="company.id"/>
    <display:column property="id" media="csv excel xml pdf" titleKey="company.id"/>
    <display:column property="discription" sortable="true" titleKey="company.discription"/>
    <display:column property="email" sortable="true" titleKey="company.email"/>
    <display:column property="fax" sortable="true" titleKey="company.fax"/>
    <display:column property="location" sortable="true" titleKey="company.location"/>
    <display:column property="name" sortable="true" titleKey="company.name"/>
    <display:column property="phone" sortable="true" titleKey="company.phone"/>
    <display:column property="productionTag" sortable="true" titleKey="company.productionTag"/>
    <display:column property="site" sortable="true" titleKey="company.site"/>
    <display:column property="userId" sortable="true" titleKey="company.userId"/>

    <display:setProperty name="paging.banner.item_name"><fmt:message key="companyList.company"/></display:setProperty>
    <display:setProperty name="paging.banner.items_name"><fmt:message key="companyList.companies"/></display:setProperty>

    <display:setProperty name="export.excel.filename"><fmt:message key="companyList.title"/>.xls</display:setProperty>
    <display:setProperty name="export.csv.filename"><fmt:message key="companyList.title"/>.csv</display:setProperty>
    <display:setProperty name="export.pdf.filename"><fmt:message key="companyList.title"/>.pdf</display:setProperty>
</display:table>

<input type="button" style="margin-right: 5px" onclick="location.href='<c:url value="/companyform"/>'" value="<fmt:message key="button.add"/>"/>
<input type="button" onclick="location.href='<c:url value="/mainMenu"/>'" value="<fmt:message key="button.done"/>"/>

<script type="text/javascript">
    highlightTableRows("companyList");
</script> 
